﻿<%@ Page Language="C#" AutoEventWireup="true" MasterPageFile="../MasterPage.Master" 
    CodeBehind="wfOrdenCompraBnd.aspx.cs" Inherits="CO.wfOrdenCompraBnd" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">

    <script type="text/javascript">

        window.onload = function ()
                        {
                            this.ResizeGrid();
                            this.MessageOnPostback();
                        }

                        function ResizeGrid()
                        {
                            internalGridResize("<%= gvList.ClientID %>");
                        }

                        function panelOnUpdating()
                        {
                            updatePanelAnimationUpdating();
                        }

                        function panelOnUpdated()
                        {
                            ResizeGrid();
                            updatePanelAnimationUpdated();
                        }
   
    </script>

    <script  type="text/javascript">
        function DevolverDatos(codigo, Descrip)
        {
            opener.fDevolverSeleccion3(codigo, Descrip);
        }
    </script>

</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">

    <div class="ToolBar" style="height:24px">
        <asp:Menu ID="mnuToolbar" CssClass="ToolBarControl" runat="server" Orientation="Horizontal">
        </asp:Menu>
            <asp:ImageButton ID="btnNuevo" style="width: 16px;height: 16px" CssClass="ToolBarControl" runat="server" ToolTip="Grabar" onclick="btnNuevo_Click" />
            <asp:Label ID="Label19" runat="server" ForeColor="Black" Text="Nuevo"></asp:Label>
       
    </div>
 <div align="center">
    <div>
    <div>

                                    <table width="100%" cellpadding="0" cellspacing="2" 
            align="center">
                                    <tr>
                                            <td style="width: 5px;">
                                                &nbsp;
                                            </td>
                                            <td class="style22">
                                                Fecha Inicio
                                            </td>
                                            <td class="style27">
                                                <esd:esdDateTextBox ID="ucControlFecha1" runat="server" />
                                            </td>
                                            <td style="margin-left: 40px;" class="style16">
                                                <asp:TextBox ID="TextBox1" runat="server" BorderStyle="None" Enabled="False" 
                                                    Height="15px" Width="20px"></asp:TextBox>
                                                <br />
                                            </td>
                                            <td class="style26">
                                                <asp:CheckBox ID="chkPendiente" runat="server" Text="Pendiente" />
                                            </td>
                                            <td>
                                                    &nbsp;</td>
                                            <td style="width: 10px;">
                                                  Planta

                                            </td>
                                            <td class="style30">
                                               
                                                <asp:DropDownList ID="dbPlanta" runat="server" Width="200px" 
                                                    AutoPostBack="True">
                                                </asp:DropDownList>
                                               
                                            </td>
                                            <td>
                                                &nbsp;</td>
                                            <td>
                                                <asp:Button ID="btnBuscar" runat="server" onclick="btnBuscar_Click" 
                        Text="Buscar" CssClass="esdButtonStyle" Width="80px" />
              
         
                                            </td>
                                            <td style="width: 5px;">
                                                &nbsp;</td>
                                        </tr>
                                        
                                       
                                        <tr>
                                            <td class="style4">
                                            </td>
                                            <td class="style20">
                                                Fecha Fin</td>
                                            <td class="style28">
                                                <esd:esdDateTextBox ID="ucControlFecha2" runat="server" />
                                            </td>
                                            <td class="style16" style="margin-left: 40px;">
                                                <asp:TextBox ID="TextBox2" runat="server" BackColor="#CCCCCC" 
                                                    BorderStyle="None" Enabled="False" Height="15px" Width="20px"></asp:TextBox>
                                            </td>
                                            <td class="style13">
                                                <asp:CheckBox ID="chk_nAutoriza" runat="server" Text="No autorizar" />
                                            </td>
                                            <td class="style5">
                                            </td>
                                            <td class="style6">
                                                Codigo O/C
                                            </td>
                                            <td class="style5" colspan="2" align="left">
                    <asp:TextBox ID="txtIdOrdenCompra" runat="server" CssClass="esdTextBox" 
                    Width="100px"></asp:TextBox>
                                            </td>
                                            <td class="style5">
                                                <asp:Button ID="btnBuscar2" runat="server" CssClass="esdButtonStyle" 
                                                    Text="Salir" Width="80px" />
                                            </td>
                                            <td class="style4">
                                                &nbsp;</td>
                                        </tr>
                                        <tr>
                                            <td class="style1">
                                            </td>
                                            <td class="style21">
                                            </td>
                                            <td class="style29">
                                            </td>
                                            <td class="style16" style="margin-left: 40px;">
                                                <asp:TextBox ID="TextBox3" runat="server" BackColor="#FFCC99" 
                                                    BorderStyle="None" Enabled="False" Height="15px" Width="20px"></asp:TextBox>
                                            </td>
                                            <td class="style14">
                                                <asp:CheckBox ID="chkAutoriza" runat="server" Text="Autorizadas" />
                                            </td>
                                            <td class="style2">
                                            </td>
                                            <td class="style3">
                                                Proveedor</td>
                                            <td class="style2" colspan="2">
                    <asp:TextBox ID="txtProveedor" runat="server" CssClass="esdTextBox" 
                    Width="300px"></asp:TextBox>
                                            </td>
                                            <td class="style2">
                                            </td>
                                            <td class="style1">
                                                &nbsp;</td>
                                        </tr>
                                        <tr>
                                            <td style="width: 5px;">
                                                &nbsp;</td>
                                            <td class="style22">
                                                &nbsp;</td>
                                            <td class="style27">
                                                &nbsp;</td>
                                            <td class="style16">
                                                &nbsp;</td>
                                            <td class="style26">
                                                &nbsp;</td>
                                            <td>
                                                &nbsp;</td>
                                            <td style="width: 10px;">
                                                &nbsp;</td>
                                            <td colspan="2">
                                                &nbsp;</td>
                                            <td>
                                                &nbsp;</td>
                                            <td style="width: 5px;">
                                                &nbsp;</td>
                                        </tr>
                                        
                                       
                                    </table>

    </div>
 
        <div>
                
      
                &nbsp;
             &nbsp;&nbsp;
          &nbsp;
          &nbsp;
     
      
      
                    &nbsp;</div>
        <div>
       
     <br />
        
        </div>
   
    </div>
    <div>
    <div style="overflow: auto;  height: 400px">
    <div class="DataDetail">
                    <asp:GridView ID="gvList" runat="server" AutoGenerateColumns="False" 
                        CellPadding="0" GridLines="None" AllowSorting="True" 
                        onrowcommand="gvList_RowCommand" >
                    
                        <AlternatingRowStyle CssClass="esdGridAlternativeRowStyle" />
                        <Columns>

                                 <asp:TemplateField>
                                         <HeaderStyle Width="20px" />
                                        <ItemStyle HorizontalAlign="Center" Width="20px" CssClass="etiqueta"></ItemStyle>
                                        <ItemTemplate>
                                            <asp:ImageButton ID="ImageButton2" runat="server" CommandName="cmdaddFact" CommandArgument='<%# Bind("Id_ordenco") %>'
                                             Text='<%# DataBinder.Eval(Container, "DataItem.Id_ordenco") %>' 
                                                ImageUrl="~/Images/Icons/Enabled/AddFolder.png" ToolTip="Añadir Factura" />
                                        </ItemTemplate>
                                    </asp:TemplateField>


                                     <asp:TemplateField>
                                         <HeaderStyle Width="20px" />
                                        <ItemStyle HorizontalAlign="Center" Width="20px" CssClass="etiqueta"></ItemStyle>
                                        <ItemTemplate>
                                            <asp:ImageButton ID="ImageButton1" runat="server" CommandName="cmdadd" CommandArgument='<%# Bind("Id_ordenco") %>'
                                             Text='<%# DataBinder.Eval(Container, "DataItem.Id_ordenco") %>' 
                                                ImageUrl="~/Images/Icons/Enabled/AddFolder.png" ToolTip="Añadir Factura" />
                                        </ItemTemplate>
                                    </asp:TemplateField>

                                 <asp:TemplateField HeaderText="Id O/C">
                                        <ItemStyle HorizontalAlign="Center" Width="70px" CssClass="etiqueta"></ItemStyle>
                                        <ItemTemplate>
                                            <asp:LinkButton ID="lblOCCodigo" runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.Id_ordenco") %>'
                                                CommandArgument='<%# Bind("Id_ordenco") %>' CommandName="Detalle" CssClass="textoTabulado"
                                                CausesValidation="false" ToolTip="Consulta OC"></asp:LinkButton>
                                        </ItemTemplate>
                                    </asp:TemplateField>

                            <asp:TemplateField HeaderText="Fecha">
                                <ItemTemplate>
                                    <asp:Label ID="Label2" runat="server" Text='<%# Bind("fe_ordenco") %>'></asp:Label>
                                </ItemTemplate>
                             
                                <HeaderStyle Width="100px" />
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="Proveedor">
                                <ItemTemplate>
                                    <asp:Label ID="Label3" runat="server" Text='<%# Bind("ds_raznombre") %>' 
                                        Width="250px"></asp:Label>
                                </ItemTemplate>
                         
                                <HeaderStyle Width="300px" />
                                <ItemStyle Width="300px" />
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="OP">
                                <ItemTemplate>
                                    <asp:Label ID="Label4" runat="server" Text='<%# Bind("id_op") %>'></asp:Label>
                                </ItemTemplate>

                                <HeaderStyle Width="50px" />
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="Producto">
                                <ItemTemplate>
                                    <asp:Label ID="Label5" runat="server" Text='<%# Bind("ds_producto") %>' 
                                        Width="250px"></asp:Label>
                                </ItemTemplate>
                           
                                <HeaderStyle Width="200px" />
                                <ItemStyle Width="300px" />
                            </asp:TemplateField>
    
                        </Columns>
                        <HeaderStyle CssClass="esdGridHeaderStyle" />
                        <PagerStyle CssClass="gridPagerStyle" />
                        <RowStyle CssClass="esdGridRowStyle" />
                        <SelectedRowStyle CssClass="esdGridSelectedRowStyle" />
                    </asp:GridView>
             </div>

             <div>
          
                 
             </div>
          </div>
          <div>

                 <asp:Label ID="Message" runat="server"></asp:Label>
          </div>
    </div>
    </div>
    

</asp:Content>